
cmake_minimum_required(VERSION 3.4.1)

add_subdirectory(librtmp)

include_directories(librtmp)
include_directories(x264/include)
include_directories(faac/include)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/x264/libs/${CMAKE_ANDROID_ARCH_ABI}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/faac/libs/${CMAKE_ANDROID_ARCH_ABI}")

add_library( native-lib
             SHARED
             native-lib.cpp
             VideoChannel.cpp
             AudioChannel.cpp)

target_link_libraries( native-lib
                       rtmp
                       x264
                       faac
                       log )